﻿<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>@ViewBag.Title</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link href="~/Content/bootstrap.min.css" rel="stylesheet" />
    <link href="~/Content/nprogress.css" rel="stylesheet" />
    <link href="~/Content/style.css" rel="stylesheet" />
    @Styles.Render("~/EasyUI/themes/insdep/css")
    <link rel="apple-touch-icon-precomposed" href="~/Images/icon.png">
    <link rel="shortcut icon" href="~/favicon.ico">
    <!--[if gte IE 9]>
      <script src="~/Scripts/jquery-3.2.1.min.js" type="text/javascript"></script>
      <script src="~/Scripts/html5shiv.min.js" type="text/javascript"></script>
      <script src="~/Scripts/respond.min.js" type="text/javascript"></script>
      <script src="~/Scripts/selectivizr-min.js" type="text/javascript"></script>
    <![endif]-->
    <!--[if lt IE 9]>
      <script>window.location.href='upgrade-browser.html';</script>
    <![endif]-->
    @RenderSection("headSection", required: false)
</head>
<body class="user-select single">
    @Html.Partial("~/Areas/Blogs/Views/Shared/_Header.cshtml")
    <section class="container">
        <div class="content-wrap">
            <div class="content">
                @RenderBody()
            </div>
        </div>
        @Html.Partial("~/Areas/Blogs/Views/Shared/_Sidebar.cshtml")
    </section>
    <footer class="footer">
        <div class="container">
            <p>本站[<a href="#">衡阳师范学院物联网协会博客园</a>]的部分内容来源于网络，若侵犯到您的利益，请联系站长删除！谢谢！</p>
        </div>
        <div id="gotop"><a class="gotop"></a></div>
    </footer>
    <script src="~/Scripts/jquery-3.2.1.min.js"></script>
    <script src="~/Scripts/bootstrap.min.js"></script>
    <script src="~/Scripts/jquery.validate.min.js"></script>
    <script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
    <script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script>
    <script src="~/EasyUI/jquery.easyui.min.js"></script>
    <script src="~/EasyUI/themes/insdep/jquery.insdep-extend.min.js"></script>
    <script src="~/EasyUI/locale/easyui-lang-zh_CN.js"></script>
    <script src="~/Scripts/jquery.msgBox.js"></script>
    <script src="~/Scripts/jquery.processJsonMsg.js"></script>
    <script src="~/Scripts/Notify.js"></script>
    @RenderSection("scripts", required: false)
    <script>
        $('#gotop').click(function () { scrollTo(0, 0); });
        $('#nav-bar').load('@Url.Action("NavBar","Blog",new {area = "Blogs"})');
        $().ready(function() {
            $.ajax({
                url: '@Url.Content("~/Blogs/Blog/GetTags")',
                type: 'POST',
                data: {count :10},
                error: function() {
                    $.notifyBox.showNotifyErr('加载标签云失败，网络错误!');
                },
                success: function(response) {
                    if (response.Statu !== 1) {
                        $.notifyBox.showNotifyErr(response.Msg);
                        return;
                    }
                    var tagCloud = $('#tag-cloud');
                    tagCloud.empty();
                    for (var i = 0; i < response.Data.length; i++) {
                        var item = response.Data[i];
                        var cli = $('<li></li>');
                        tagCloud.append(cli);
                        cli.append($('<li><a href="@Url.Content("~/Blogs/Blog/TagBlogList")/' + item.Id + '" draggable="false">' + item.TagName + ' <span class="badge">' + item.TagBlogCount+'</span></a></li>'));
                    }
                }
            });
            $.ajax({
                url: '@Url.Action("GetNewCommentBlogList","Blog",new {area = "Blogs"})',
                type: 'POST',
                error: function() {
                    $.notifyBox.showNotifyErr('加载最新评论文章失败，网络错误!');
                },
                success: function(response) {
                    if (response.Statu !== 1) {
                        $.notifyBox.showNotifyErr(response.Msg);
                        return;
                    }
                    var comment = $('#newCommentBlog');
                    comment.empty();
                    for (var i = 0; i < response.Data.length; i++) {
                        var item = response.Data[i];
                        var cli = $('<li></li>');
                        comment.append(cli);
                        cli.append($('<a title="' + item.Title + '" href="@Url.Content("~/Article/")'+item.Id+ '.shtml"><span class="text" style="margin-left: -130px;">'+(i+1)+'#：' + item.Title+'</span></a>'));
                    }
                }
            });
        });
    </script>
</body>
</html>